import java.util.Arrays;
public class test {
    public static void main(String[] args){
        int[]array={1,2,1,3,2};
//        System.out.println(func1(array));
//        System.out.println(func2(array));
        System.out.println(func3(array));
    }
    public static int func1(int[] array){
        Arrays.sort(array);
        int num= (array.length-1)/2;
        return array[num];
    }
    public static boolean func2(int[] array){
        int count=0;
        for (int i = 0; i < array.length ; i++) {
            if(array[i]%2!=0){
                count++;
            }
            if(count==3){
                return true;
            }
            if(array[i]%2==0){
                count=0;
            }
        }
        return false;
    }
    public static int func3(int[] array){
        int num=0;
        for (int i = 0; i < array.length ; i++) {
            num=num^array[i];
        }
        return num;
    }
}
